<?php

	$this->Html->script(array('somente-numeros'), false);
	
	echo "<fieldset><legend>Imprimir</legend>";
	
	echo $this->Form->create('AlunoEvento', array('target' => '_blank', 'onsubmit' => 'return valida();'));
	echo $this->Form->input('ano', array('type' => 'text', 'label' => __('Ano'), 'class' => 'tamanho10', 'default' => date('Y'), 'maxlength' => 4, 'onKeyPress' => 'return SomenteNumero(event)'));
	echo '<div style="clear:both;"></div>';
	echo $this->Form->input('mes_inicial',array('type' => 'select', 'options' => $meses, 'empty' => 'Qualquer mês...', 'class' => 'tamanho20', 'label' => __('Mês Inicial')));
	echo $this->Form->input('mes_final',array('type' => 'select', 'options' => $meses, 'empty' => 'Qualquer mês...', 'class' => 'tamanho20', 'label' => __('Mês Final')));
	echo '<div style="clear:both;"></div>';
	echo $this->Form->input('evento_id',array('type' => 'select', 'options' => $eventos, 'empty' => 'Todos...', 'class' => 'tamanho50', 'label' => __('Evento')));
	echo '<div style="clear:both;"></div>';
	echo '<div class="botoes_form">';
	echo $this->Form->button('Imprimir', array('type' => 'submit'));
	echo '</div>'; 
	echo $this->Form->end();
	echo '</fieldset>';
?>

<script>

	function valida() {

		if (!$('#AlunoEventoAno').val()) {
			alert('Ano deve ser informado!');
			return false;
		}

		return true;
	}

</script>	